using System.Collections.Generic;
using System.Xml.Linq;
using Orchard;
using Bootstrap.Models;

namespace Bootstrap.Services {
    public interface IBootstrapSettingsService : IDependency {
        IEnumerable<FeatureDescriptor> Features();
        IEnumerable<VariableDescriptor> Variables();
        IEnumerable<SettingDescriptor> Settings();
        
        IEnumerable<FeatureDescriptor> EnabledFeatures();
        IDictionary<string, string> AvailableVariables();
        IDictionary<string, string> AvailableSettings(); 
        
        bool IsEnabled(string name);
        bool SetFeature(string name, bool enabled);
        int GetPosition(string name);

        string GetValue(string name);
        bool SetValue(string name, string value);
        string GetSetting(string name);
        bool SetSetting(string name, string value);

        bool RestoreFeatureDefaults();
        bool RestoreVariableDefaults();
        bool RestoreSettingDefaults();

        XDocument Export();
        bool Import(XDocument source);
    }
}